package com.hspedu.map_;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

@SuppressWarnings({"all"})
public class Map01 {
    public static void main(String[] args) {
        Map map = new HashMap();
        map.put("no1","hsp");
        map.put("no2","zwj");
        map.put("no2","kkk");

        Set set = map.entrySet();
        System.out.println(set.getClass());

        for(Object obj:set){
            Map.Entry entry = (Map.Entry)obj;
            System.out.println(entry.getKey() +"-"+ entry.getValue());
        }

        Set set1 = map.keySet();
        System.out.println(set1.getClass());
        for(Object obj:set1){
            System.out.println(obj);
        }
    }
}
